package com.b.service;

import com.b.domain.Product;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.elasticsearch.core.SearchPage;

import java.util.List;

public interface ProductService{


    boolean deleteByPrimaryKey(Integer id);

    int insert(Product record);

    int insertSelective(Product record);

    Product selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Product record);

    int updateByPrimaryKey(Product record);

    List<Product> getAll();

    SearchPage<Product> findProductByTitleLikeAndCategoryIdAndDescriptionLike(String title, Integer categoryId, String description, PageRequest pageRequest);

    boolean add(Product product);

    boolean update(Product product);
}
